<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head lang="en">
<base href="${ctx }">
<!-- 字符编码 -->
<meta charset="UTF-8" content="">
<!-- IE兼容模式 -->
<meta http-equiv="X-UA-COMPATIBLE" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<!-- 采用高速模式渲染（目前仅有360支持） -->
<meta name="renderer" content="webkit">
<!-- Bootstrap 核心 CSS库 -->
<link href="${ctx }/styles/BJUI/new/css/bootstrap.min.css"
	rel="stylesheet">
<!-- Font-awesome 图标 CSS库 -->
<link href="${ctx }/styles/BJUI/new/css/font-awesome.min.css"
	rel="stylesheet">
<!-- JQuery UI CSS库 -->
<link href="${ctx }/styles/BJUI/new/css/jquery-ui.min.css"
	rel="stylesheet">
<!-- JQuery -->
<script src="${ctx }/styles/BJUI/new/js/jquery-1.10.2.min.js"
	type="text/javascript"></script>
<script src="${ctx }/styles/BJUI/new/js/jquery.unobtrusive-ajax.min.js"
	type="text/javascript"></script>
<!-- JQuery UI -->
<script src="${ctx }/styles/BJUI/new/js/jquery-ui.min.js"
	type="text/javascript"></script>
<!-- 脉动提示插件 -->
<script src="${ctx }/styles/BJUI/new/js/jquery.pulsate.min.js"
	type="text/javascript"></script>
<!-- Bootstrap 核心 JS库 -->
<script src="${ctx }/styles/BJUI/new/js/bootstrap.min.js"
	type="text/javascript"></script>
<!-- 浏览器判断 -->
<script src="${ctx }/styles/BJUI/new/js/Browser.js"
	type="text/javascript"></script>
<!-- 母版页 样式 -->
<link href="${ctx }/styles/BJUI/new/css/carousel.css" rel="stylesheet">
<link href="${ctx }/styles/BJUI/new/css/style.css" rel="stylesheet">
<link href="${ctx }/styles/BJUI/new/css/leon.css" rel="stylesheet">
<link href="${ctx }/styles/BJUI/new/css/index.css" rel="stylesheet">
<title>订单详情</title>
</head>


<body>
	<!-- Start: Ajax Tiper -->
	<!-- Start AJAX提示（全局） -->
	<link href="${ctx }/styles/BJUI/new/css/nprogress.css" rel="stylesheet">
	<script src="${ctx }/styles/BJUI/new/js/nprogress.js"
		type="text/javascript"></script>
	<script type="text/javascript">
		var CurrAjaxCount = 0;
		$(document).ready(function() {
			$(document).ajaxStart(function() {
				if (CurrAjaxCount == 0) {
					NProgress.start();
				}
				CurrAjaxCount = CurrAjaxCount + 1;
			}).ajaxStop(function() {
				CurrAjaxCount = CurrAjaxCount - 1;
				if (CurrAjaxCount <= 0) {
					NProgress.done();
				}
			});
		});
	</script>


	<!-- End: Browser Tiper -->
	<div class="clearfix">
		<div class="carousel-inner" id="mainWindow">
			<form class="form-inline" action="">
				<div class="row" style="position: relative;">
					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text">出发</label> <span
							class="label-text display-right mr-10">广西壮族自治区南宁市</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<span class="label-text ">${object.originAddress}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text display-left label-and-input">发货人姓名</label>
						<span class="label-text display-right mr-10">${object.originName}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text display-left label-and-input">联系电话</label>
						<span class="label-text display-right mr-10">${object.originPhone}</span>
					</div>

					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text display-left">所需车型</label> <span
							class="label-text display-right mr-10">${object.vehicleType}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<input class="input-max" value="${object.remarks}" readOnly="true"
							placeholder="请填写货物备注，可留空">
					</div>
					<div class="col-sm-8 box-size-120" style="margin-top: 3px">
						<div style="width: 40%; height: 100%; float: left">
							<div class="text-center"
								style="font-size: 18px; margin-top: 35px">
								距离<br> <span id="distanceValue" style="font-size: 18px">${object.distance}公里</span>
							</div>
						</div>
						<div class="text-center" style="width: 20%; float: left;">
							<img src="${ctx }/styles/BJUI/new/images/to_place.png"
								" style="width: 48px;" alt="">
						</div>
						<div style="width: 40%; height: 100%; float: left">
							<div class="text-center"
								style="font-size: 18px; margin-top: 35px">
								价格<br> <span id="moneyValue" style="font-size: 18px">${object.money}元</span>
							</div>
						</div>
					</div>

					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text">目的</label> <span
							class="label-text display-right mr-10">广西壮族自治区南宁市</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<span class="label-text ">${object.destinationAddress}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text display-left label-and-input">收货人姓名</label>
						<span class="label-text display-right mr-10">${object.destinationName}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<label class="label-text display-left label-and-input">联系电话</label>
						<span class="label-text display-right mr-10">${object.destinationPhone}</span>
					</div>

					<div class="col-sm-8 box-40-mb-1" style="margin-top: 3px;">
						<span class="label-text">订单号：${object.orderNum}</span> <span
							class="label-text display-right mr-10 color-orange">${object.orderStatusStr}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<span class="label-text">下单时间：${object.time}</span> <span
							class="label-text display-right mr-10 color-placeholder">${object.isPay}</span>
					</div>
					<div class="col-sm-8 box-40-mb-1"
						onclick="details('${object.receiveAccountId}')">
						<span class="label-text">接单人：${object.nickname}</span> <img
							src="${ctx }/styles/BJUI/new/images/right-skip.png"
							class="display-right skip-right" alt=""> <img
							src="${object.facePath}"
							class="display-right header-right img-circle" alt="">
					</div>
					<div class="col-sm-8 box-40-mb-1">
						<span class="label-text">签收时间：${object.collectTime} </span>
					</div>

					<div class="col-sm-8 box-size-200 text-center"
						style="margin-top: 3px">
						<div
							style="height: 40px; width: 90%; margin: 0 auto; border-bottom: 1px dotted #0099CC"></div>
						<c:choose>

							<c:when test="${object.orderStatus == 4}">

								<br>
								<a
									href="${ctx }/weixinView/comment?receiveAccountId=${object.receiveAccountId}&amp;launchAccountId=${object.launchAccountId}&amp;id=${object.id}"
									class="btn btn-default color-border-deep-blue" role="button"
									style="font-size: 10px; padding: 4px 12px 4px; width: 20%">点评</a>
								<br>
							</c:when>

							<c:when test="${object.orderStatus == 0}">
								<br>
								<a href="javascript:cancelOrder(${object.id })"
									class="btn btn-default color-border-deep-blue" role="button"
									style="font-size: 10px; padding: 4px 12px 4px; width: 20%">取消订单</a>
								<br>
							</c:when>



							<c:otherwise>
								<br>
								<br>
							</c:otherwise>
						</c:choose>


						<br> <br> <span>客服热线</span> <br> <span>400-186-000</span>
					</div>

				</div>
			</form>
		</div>
	</div>
	<script src="${ctx }/styles/BJUI/new/js/ddes.js" charset="UTF-8"
		type="text/javascript"></script>
</body>
<script type="text/javascript">
	function cancelOrder(id) {
		if (window.confirm("确认取消订单吗?这个操作是不可逆的")) {
			$.ajax({
				type : "GET",
				dataType : 'json',
				url : "${ctx }/weixinView/cancelOrder?id=" + id,
				error : function(data) {
					alert("出错了！！:");
				},
				success : function(data) {
					if (data["ret"] == 0) {
						alert("设置成功");
						window.location.href = "";
					} else {
						alert("设置失败");
					}
				}
			});
		} else {
		}

	}
	function details(id) {
		window.location.href = "${ctx }/weixinView/dataPersonal?usersId=" + id;
	}
</script>
</html>
